function threshold = stagnationCriterion(iters, i, lowerBound = 7)
    threshold=iters-iters*power(iters/(iters-max(iters*0.01,lowerBound))+power(e,i.*-1/(iters*0.1)),-1);
endfunction;
